import { createApp } from 'vue';
import pinia from '/@/stores/index';
import App from './App.vue';
import router from './router';
import { directive } from '/@/directive';
import Components from '/@/components';
import { i18n } from '/@/i18n';
import { properties } from '/@/utils/globalProperties';
import { initAntiDebug } from '/@/utils/anti-debug';
import '@vuemap/vue-amap/dist/style.css';

import request from '/@/assets/js/request';
import util from '/@/assets/js/util';
import verify from '/@/assets/js/verify';
initAntiDebug();

// 导入全局样式
import '/@/theme/tailwind.css';
import '/@/theme/index.scss';
import '/@/assets/styles/layout.scss';

const app = createApp(App);
app.config.globalProperties.$request = request;
app.config.globalProperties.$util = util;
app.config.globalProperties.$verify = verify;

// 全局自定方法挂载
properties(app);
// 全局自定义指令挂载
directive(app);

app
	.use(pinia) // pinia 存储
	.use(router) // 路由
	.use(Components) // 全局引入自定义的组件&第三方的组件
	.use(i18n) // 国际化
	// .use(VueMap)
	.mount('#app');
